From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0002.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0003.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0004.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0005.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0006.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0007.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0008.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0009.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0010.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0011.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0012.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0013.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0014.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0015.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0016.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0017.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0018.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0019.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0020.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0021.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0022.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0023.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0024.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0025.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0026.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0027.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0028.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0029.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0030.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0031.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0032.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0033.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0034.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0035.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0036.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0037.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0038.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0039.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0040.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0041.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0042.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0043.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0044.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0045.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0046.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0047.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0048.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0049.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0050.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0051.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0052.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0053.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0054.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0055.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0056.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0057.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0058.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0059.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0060.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0061.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0062.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0063.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0064.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0065.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0066.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0067.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0068.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0069.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0070.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0071.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0072.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0073.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0074.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0075.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0076.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0077.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0078.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0079.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0080.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0081.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0082.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0083.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0084.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0085.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0086.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0087.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0088.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0089.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0090.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0091.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0092.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0093.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0094.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0095.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0096.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0097.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0098.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0099.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0100.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0101.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0102.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0103.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0104.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0105.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0106.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0107.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0108.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0109.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0110.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0111.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0112.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0113.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0114.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0115.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0116.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0117.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0118.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0119.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0120.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0121.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0122.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0123.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0124.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0125.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0126.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0127.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0128.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0129.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0130.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0131.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0132.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0133.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0134.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0135.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0136.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0137.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0138.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0139.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0140.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0141.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0142.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0143.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0144.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0145.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0146.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0147.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0148.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0149.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0150.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0151.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0152.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0153.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0154.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0155.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0156.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0157.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0158.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0159.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0160.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0161.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0162.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0163.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0164.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0165.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0166.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0167.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0168.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0169.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0170.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0171.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0172.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0173.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0174.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0175.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0176.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0177.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0178.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0179.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0180.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0181.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0182.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0183.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0184.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0185.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0186.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0187.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0188.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0189.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0190.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0191.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0192.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0193.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0194.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0195.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0196.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0197.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0198.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0199.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0200.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0201.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0202.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0203.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0204.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0205.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0206.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0207.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0208.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0209.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0210.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0211.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0212.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0213.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0214.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0215.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0216.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0217.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0218.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0219.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0220.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0221.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0222.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0223.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0224.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0225.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0226.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0227.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0228.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0229.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0230.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0231.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0232.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0233.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0234.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0235.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0236.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0237.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0238.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0239.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0240.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0241.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0242.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0243.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0244.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0245.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0246.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0247.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0248.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0249.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0250.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0251.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0252.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0253.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0254.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0255.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0256.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0257.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0258.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0259.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0260.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0261.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0262.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0263.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0264.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0265.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0266.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0267.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0268.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0269.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0270.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0271.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0272.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0273.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0274.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0275.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0276.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0277.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0278.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0279.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0280.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0281.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0282.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0283.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0284.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0285.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0286.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0287.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0288.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0289.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0290.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0291.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0292.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0293.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0294.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0295.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0296.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0297.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0298.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0299.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0300.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0301.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0302.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0303.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0304.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0305.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0306.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0307.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0308.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0309.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0310.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0311.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0312.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0313.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0314.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0315.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0316.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0317.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From tjarvi at qbang.org Mon Apr 24 18:19:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:19:18 -0600 (MDT) Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: > > root at David /usr/ports/comms/rxtx#make install clean > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > Have you tried compiling rxtx 2.1-7? If you give me the output on or off the list, I can probably fix the compile error easily. rxtx compies on solaris for instance. It wont be hard to fix. > java.lang.UnsatisfiedLinkError: > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > object "libpthread.so.0" not found, required by "librxtxSerial.so" libpthread is part of glibc. I guess you are using a linux compatability layer? More interesting would be getting the native bsd working again. I'm not aware of why its been marked unable to compile. Thats not from rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Mon Apr 24 18:27:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 24 Apr 2006 18:27:39 -0600 (MDT) Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > Is anyone using Locks for the serial ports? > The Doug Lea code appears to have made it into > the concurrent package, so that we can have ReadWriteLock > built into the CORE jdk1.5. > > The Comm API needs this type of thing, right? > > Of course, none of this will work under JDK1.4, which is > a bit of a stinky mess. > > Thanks! > - Doug > Hi Doug I tried to push lockfiles because its the right thing to do for standards like the FHS. I still think rxtx should use lockfiles and if the fight is to be had it should be done in the standards. But many companies ship rxtx with locks disabled. It is a mess and wasn't thought out in advance. Do you have an idea? I need to read about ReadWriteLock. As you mention this is a big mess with versions even if done right. -- Trent Jarvi tjarvi at qbang.org From iamshyang at gmail.com Mon Apr 24 20:57:08 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 10:57:08 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD In-Reply-To: References: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> Message-ID: <152f8d5c0604241957k1308560ap9c200ff6dee43d5f@mail.gmail.com> Hi, I tried to get ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip and ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip unzip and ./configure but after I made the source, the output was return: ==================================== root at David /usr/local/tmp/rxtx-2.1-7#make Error expanding embedded variable. ==================================== And I couldn't continue the process. thanks... 2006/4/25, Trent Jarvi : > > > > root at David /usr/ports/comms/rxtx#make install clean > > > > ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. > > > > Have you tried compiling rxtx 2.1-7? If you give me the output on or > off the list, I can probably fix the compile error easily. rxtx compies > on solaris for instance. It wont be hard to fix. > > > java.lang.UnsatisfiedLinkError: > > /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared > > object "libpthread.so.0" not found, required by "librxtxSerial.so" > > libpthread is part of glibc. I guess you are using a linux compatability > layer? More interesting would be getting the native bsd working again. > I'm not aware of why its been marked unable to compile. Thats not from > rxtx. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com From j.a.horsmeier at wanadoo.nl Tue Apr 25 06:22:57 2006 From: j.a.horsmeier at wanadoo.nl (Jos A. Horsmeier) Date: Tue, 25 Apr 2006 14:22:57 +0200 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: Message-ID: <028f01c66862$fe9ccb10$1801a8c0@CALVIN> > On Mon, 24 Apr 2006, Dr. Douglas Lyon wrote: > > > Is anyone using Locks for the serial ports? > > The Doug Lea code appears to have made it into > > the concurrent package, so that we can have ReadWriteLock > built into > > the CORE jdk1.5. > > > > The Comm API needs this type of thing, right? > > > > Of course, none of this will work under JDK1.4, which is > > a bit of a stinky mess. > > > > Thanks! > > - Doug > > > Hi Doug > > I tried to push lockfiles because its the right thing to do for > standards like the FHS. I still think rxtx should use > lockfiles and if > the fight is to be had it should be done in the standards. > > But many companies ship rxtx with locks disabled. > > It is a mess and wasn't thought out in advance. Do you have an idea? > I need to read about ReadWriteLock. As you mention this is > a big mess > with versions even if done right. > > -- > Trent Jarvi WHy not apply a little OO in the C part of RXTX? Define an interface like the following: extern int lock(); /* returns false if lock fails */ extern void unlock(); /* possibly called at exit */ next implement a few, small, .so files that implement different locking mechanisms (the OO jargon is 'strategies' here). Set an environment variable that tells which locking mechanism needs to be used, e.g. set LOCKING_MECHANISM macOS set LOCKING_MECHANISM file_locking etc. etc. If this environment variable is not set, pick an applicable default value, say file_locking. The core rxtx package checks this environment variable, dlopens the corresponding .so file, dlsyms for the 'lock' function and voila. Of course this simple interface can be pooped up with additional functionality of course. kind regards, Jos From Scott.Hughes at dalsemi.com Thu Apr 27 17:32:24 2006 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 27 Apr 2006 18:32:24 -0500 Subject: [Rxtx] devices Message-ID: <1809DA15308DD51180EE00508BCF219431473EA3@misnts1.dalsemi.com> Doug, Our 1-Wire API uses RXTX to talk to 1-Wire sensors. We have temperature, humidity, and A-to-D sensors available. Devices: http://www.maxim-ic.com/1-Wire.cfm API: http://www.maxim-ic.com/products/ibutton/software/1wire/1wire_api.cfm Scott -- Scott Hughes - Engineer Shughes aht dalsemi daut com Maxim/Dallas Semiconductor > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Thursday, April 20, 2006 12:10 PM > To: rxtx at qbang.org > Subject: [Rxtx] devices > > Hi All, > Is anyone using the RXTX system to interface to sensors? > I have some students who are looking to program a cell phone to > monitor the EKG and dial if the person is in trouble. > Interfacing sensors to the cell phone is really hard (for us). > > Thanks! > - DL > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From leeren.naicker at gmail.com Tue Apr 25 06:09:33 2006 From: leeren.naicker at gmail.com (Leeren) Date: Tue, 25 Apr 2006 13:09:33 +0100 Subject: [Rxtx] RXTX Message-ID: <7d2b46e50604250509o72de8bddk1e1b955a3617d8f9@mail.gmail.com> Hi there, I am trying to access a datacard I have using RXTX and the CommApi. During runtime I get this error Exception in thread "main" java.langUnsatisfiedLinkError: no rxtxSerial in java.library.path ...... ...... ...... ...... Any help on how to solve this problem would be immensely appreciated. Thanks Leeren -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060425/bb71b9c5/attachment-0318.html From bob.worsley at hp.com Thu Apr 27 17:56:02 2006 From: bob.worsley at hp.com (Worsley, Bob (Development Engineer)) Date: Thu, 27 Apr 2006 16:56:02 -0700 Subject: [Rxtx] How to read from RxTx parallel port in Win XP Message-ID: <0BC54F4063F4F240A3C30F67E40E380703EF4376@cacexc09.americas.cpqcorp.net> I'm sorry if this is a dumb question, but I didn't find the answer in the archives. I'm using the RxTx binaries for Windows on a reasonably current notebook PC running Windows XP. I can send stuff to a printer on the parallel port (LPT1), but I can't get anything back. I wrote a class that has the methods listed below. I write some data to the printer with the "write" method and then try to read a response using the "read" method, but I never get any data. I'd greatly appreciate any help you can give! Bob Worsley bobwoyid2 at yahoo.com private ParallelPort parallelPort = null; private RXTXCommDriver parallelPortDriver = null; public boolean initialize() throws IOException { if (parallelPort != null) { return false; // Already initialized } // Create the parallel port; parallelPortDriver = new RXTXCommDriver(); parallelPort = (ParallelPort)parallelPortDriver.getCommPort(address, CommPortIdentifier.PORT_PARALLEL); // Set the parallel port parameters. try { parallelPort.enableReceiveTimeout(READ_TIMEOUT); parallelPort.disableReceiveFraming(); parallelPort.disableReceiveThreshold(); //parallelPort.setMode(mode); !!!!errors } catch (UnsupportedCommOperationException e) { throw (new IOException("Parallel port with address '" + address + "' cannot be configured as specified")); } return true; } public void write(final byte[] bytes) throws IOException { initialize(); while (busyReading) { Thread.yield(); } busyWriting = true; if (bytes.length < 1) { return; } OutputStream outputStream = parallelPort.getOutputStream(); outputStream.write(bytes); outputStream.flush(); outputStream.close(); Debug.p("PPIOP.write: wrote '" + new String(bytes) + "'"); busyWriting = false; } public byte[] read() throws IOException { // Read up to MAX_BYTES bytes. initialize(); while (busyWriting) { Thread.yield(); } busyReading = true; byte[] buff = new byte[MAX_BYTES_READ]; InputStream inputStream = parallelPort.getInputStream(); // This read blocks until input data is available int bytesRead = inputStream.read(buff); inputStream.close(); // If no data read, create empty array if (bytesRead == -1) { bytesRead = 0; } byte[] deviceBytes = new byte[bytesRead]; System.arraycopy(buff, 0, deviceBytes, 0, bytesRead); if (bytesRead > 0) { Debug.p("PPIOP.read - got data: '" + new String(deviceBytes) + "'"); } busyReading = false; return deviceBytes; } From lyon at docjava.com Mon Apr 24 08:54:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 24 Apr 2006 10:54:06 -0400 Subject: [Rxtx] Lock Mess Monster (a.k.a, Little Smelly) In-Reply-To: References: Message-ID: Is anyone using Locks for the serial ports? The Doug Lea code appears to have made it into the concurrent package, so that we can have ReadWriteLock built into the CORE jdk1.5. The Comm API needs this type of thing, right? Of course, none of this will work under JDK1.4, which is a bit of a stinky mess. Thanks! - Doug From iamshyang at gmail.com Mon Apr 24 10:04:48 2006 From: iamshyang at gmail.com (Bor-Shyang, Liang) Date: Tue, 25 Apr 2006 00:04:48 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Message-ID: <152f8d5c0604240904m3fa561c2uc28802b09c61d897@mail.gmail.com> The results of your email command are provided below. Attached is your original message. - Unprocessed: I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== - Ignored: [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librxtxSerial.so " at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83) at org.smslib.CSerialDriver.open (CSerialDriver.java:70) at org.smslib.CService.connect(CService.java:198) at SendMessage.main(SendMessage.java:36) ===================================================================================================== I don't what can do for making RxTx running on my FreeBSD, can you help me? thanks a lot... PS: my environment 1.FreeBSD 6.1-RC1 (I used FreeBSD 6.0-RELEASE before and had the same problem) 2.java location : /usr/local/bin/java 3.java version : java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b00) Java HotSpot(TM) Client VM (build diablo-1.5.0_06-b00, mixed mode) 4.uname -a FreeBSD David.cs.ccu.edu.tw 6.1-RC1 FreeBSD 6.1-RC1 #0: Mon Apr 10 17:03:22 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 - ?????? - 5.autoconf version autoconf-2.59_2 6.automake version automake-1.9.6 7.libtool version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8.make version gmake-3.80_2 -- Bor-Shyang Liang National Chung Cheng University Department of Computer Science and Information Engineering High Speed Network Group Lab Email : iamshyang at exodus.cs.ccu.edu.tw Email : iamshyang at gmail.com - Done. ---------- ???? ---------- From: "Bor-Shyang, Liang" To: Rxtx-request at qbang.org Date: Mon, 24 Apr 2006 23:58:43 +0800 Subject: [RxTx]I need help to install/use RxTx on FreeBSD Hi, I need to use SMSLib(JSMSEngine) on my FreeBSD, so I have to install RxTx first. But when I tried to install RxTx (port or package), the system output some message and stop. (1)port ======================================================= root at David /usr/ports/comms/rxtx#make install clean ===> rxtx-diablo-jdk15-2.1.7p17 is marked as broken: Does not compile. *** Error code 1 Stop in /usr/ports/comms/rxtx. ======================================================= (2)package (source) =========================================== (After ./configure) root at David /usr/local/tmp/rxtx-2.1-7r2#make Error expanding embedded variable. ========================================== And finally I used the binary package, put the files in some directoris, and tried to used it. But when I use SendMessage, I got the message below: =================================================================================================== [root at David /usr/local/diablo-jdk1.5.0/bin]# java SendMessage SendMessage(): Send a message. Using SMSLib API for Java v1.1 java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object "libpthread.so.0" not found, required by "librxtxSerial.so" thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/local/diablo-jdk1.5.0/jre/lib/i386/librxtxSerial.so: Shared object " libpthread.so.0" not found, required by "librx